package me.zk.practice1.hw;

import java.util.Scanner;

public class HWBJ23 {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        String ss = "abcdefghijklmnopqrstuvwxyz";
        int size = Integer.parseInt(scanner.nextLine());

        for (int i = 0; i < size; i++) {
            String s = scanner.nextLine();

            String[] strs = s.split("");
            StringBuffer sb = new StringBuffer();
            for (int j = 0; j < strs.length; j++) {
                int add = getAdd(j);
                int index = (ss.indexOf(strs[j]) + add) % 25;
                sb.append(ss.charAt(index));
            }
            System.out.println(sb);


        }
    }



    public static int getAdd(int n) {
        if (n == 0) {
            return 1;
        }
        if (n == 1) {
            return 2;
        }
        if (n == 2) {
            return 4;
        }
        return getAdd(n-1) + getAdd(n-2) + getAdd(n-3);
    }
}
